1. Field of the Invention
The invention relates to an electronic system, and more particularly, to an information storage and retrieval system having a plurality of storage units using a single port on a data bus system, such as the Integrated Drive Electronics (IDE) bus or a Serial AT Attachment (SATA) interface.
2. Description of Related Art
Electronic information storage devices are becoming increasingly important in today's business environment. Optical storage media, flash card devices, and other information storage options are important technologies which can be integrated into a PC or other similar system. In order to combine the functions and advantages of various storage technologies, interconnect buses such as the Integrated Drive Electronics (IDE) bus, also known as the AT Attachment (ATA) bus or the Parallel AT Attachment (PATA) bus, as well as the Serial AT Attachment (SATA) interface are now in wide use. These represent one set of important data transfer protocol. Furthermore, the AT Attachment Packet Interface (ATAPI) for optical storage devices is an important extension of the ATA Interface which supports connections of such devices to personal computers. The ATAPI Standard defines a Task File, a set of registers used by the peripheral devices and personal computer, to transfer data. According to ATAPI, commands are communicated using packets. To allow for generic packet transfer to the peripherals devices, there is a minimum set of information that is exchanged, generically supporting the following:                Command Packet        Command Parameter Data (e.g., Write Data)        Command Response Data (e.g., Read Data)        Status, presented using the ATAPI Status Register.        The ATAPI commands were derived from the SCSI command set. With the exception of the CD-ROM MSF addressing technique, the interface uses logical rather than physical addressing for all data blocks. A logical unit may coincide with all or part of a peripheral device. Therefore, in this specification we will from time to time make a distinction between a physical device, a logical unit, or a functional unit which comprises an integrated packaged unit including one or more physical devices. However, the principles of this invention will apply beyond the categorical distinctions made here.        
As a result of the increasing demands for more data storage capabilities, data storage systems have been developed that contain one, or typically several, peripheral devices. Such data storage systems may be connected to a host to increase the data storage capacity that is available to the host, such as a personal computer. While such multi-unit data storage systems solve the capacity problem, they create a secondary problem in decreased system performance; this is because system performance can be hampered by the data bus, which usually gets stalled if multiple units are sharing the same port on an interface, such as the IDE/ATA or SATA channel port, wherein the performance of all the units are limited by the speed of the worst-performing units.
ATAPI command protocol basically follows the first-come, first-serve rule. The IDE bus protocol specifies the concept of channels and ports. Each channel in an IDE bus includes a first port and a second port and is normally associated with a single physical cable. IDE/SATA architecture includes, as one possibility, one or more peripheral storage device electrically connected to a host using an IDE or SATA channel. The host can be a personal computer system, a central processing unit (CPU) of an embedded system, or another device that needs to access a peripheral device. When a processor wishes to cause a data transfer targeting a peripheral device, the host first issues a “packet” command to the storage device. The packet command is a command that complies with the ATA protocol and informs the storage device that the processor wishes to deliver a block of data to the optical storage device that includes command programming information for a data transfer. A “command packet” comprises the structure used to communicate commands from a host computer to an ATAPI or other peripheral device.
When multiple devices and/or units share the same IDE or SATA port or other types of port, the host can fetch or store data concurrently from or to the multiple targeted units according to, for example, principles of the invention filed in a previous patent application filed on Mar. 5, 2004 with Ser. No. 10/708,464 assigned to the same party as the present invention. Each of the multiple peripheral devices is connected to and shares a single port of the IDE/SATA channel, allowing the host to access each of the logical units through the single port.
In this situation, a simple first-come, first-serve protocol would severely limit the highest achievable efficiency because the system can serve the second command only after the first one has been completed.
FIG. 1 is a flow chart diagram showing flow of data transfer from a host to a physical device. Assuming that there are two functional units Flash Card 125 and DVDRW 120 attached to a host with logical DVDRW drive 100, logical Secure Digital (SD) Drive 105, and logical Memory Stick (MS) Drive 110. The host delivers packet commands to the physical devices consisting of function units 120 and 125 for data transfer. After optionally serializing for SATA interface with Serializer 115, data is transported to and from the functional units 120 and 125 using a single port on a channel over an IDE/AT bus cable, to DVDRW pick-up head (PUH) 130, MS card 135 or SD card 140.
FIG. 2 illustrates how wasteful the processing of a Flash Read and DVD Write command under this model can be due to the slow performance of Flash Card 125. Looking at the timing diagram of FIG. 2 regarding the bus usage, Flash Read step 200—comprising three stages of receiving command 205, buffering data 210, and transfer date 215—can take, for example, up to 10 ms. Of the 10 ms during which the bus is occupied with the Flash Read command, the actual data transfer time is only 1 ms. It is clear that the slower flash card read command takes most of the precious data channel without transferring any data with the host. Under this model, the much faster DVD Write 220 would have to wait for its turn to use the IDE bus after the bus has completed Flash Read 200, and data shortage may even cause problems on the quality of DVD recording.
Therefore, there is a need for an efficient method and system for running several vendor-specific ATAPI commands or other commands on multiple units using the same port.